#!/bin/bash
if [ "$(ls -A /etc/yum.repos.d)" ];then
  mkdir /etc/yum.repos.d/bak
  mv /etc/yum.repos.d/C* /etc/yum.repos.d/bak
        if [ $? -eq 0 ];then
        echo '已备份源'
        fi
fi
#
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
#
if [ $? -eq 0 ];then
        echo '已下载阿里云源'
fi
#
yum install vim nfs-utils net-tools wget -y
if [ $? -eq 0 ];then
        echo '已下载常用工具'
fi

